<template>
	<view>
		<!--意见-->
		
		<view class="proposal" v-if="bottomType=='ranking'">
			<text @click="gotopage('/pages/proposal/feedback')">意见反馈</text>
			<text class="jianju">|</text>
			<text @click="gotopage('/pages/article/index?key=5f9cc30e755c0')">排行说明</text>
		</view>
		<view class="proposal" v-else>
			<text @click="gotopage('/pages/proposal/feedback')">意见反馈</text>
			<text class="jianju">|</text>
			<text @tap="visible=true">抽奖规则</text>
			<text class="jianju">|</text>
			<text @click="gotopage('/pages/proposal/proposal')">我要投诉</text>
		</view>
		<!--活动抽奖和信息-->
		<view class="intro">
			<view class='huodong' > 
				<text :class="[bottomType=='ranking'?'rankbg':'']">天天有礼</text>
			</view>
			<text class="font-sizewodr">天天好礼免费送 天天都有新惊喜 </text>
		</view>
		<view class="test-app" v-if="isTest">此APP本版为测试版</view>
		<alert :visible="visible" :modeltitle="modeltitle">
			<view class="responsbox">
				<view class="responsibility">
					<text>天天有礼只提供发起及参与的抽奖平台，同时本平台会在法律范围内尽可能的规范、督促用户遵守相关法律和平台使用规则，营造一个良好的、公平的抽奖平台给用户。</text>
					<text class="fontredself">注：所有奖品均由发起人提供并发放，平台不对第三方发起人行为承担责任</text>
				</view>
				<view class="close-bots" @click="closewin">我知道了</view>
			</view>
		</alert>
	</view>
</template>

<script>
	export default {
		props:{
			bottomType:{
				type:String,
				default:'global'
			}
		},
		data() {
			return {
				visible: false,
				modeltitle: '抽奖规则',
				isTest: this.$AppisTest
			}
		},
		created() {
			uni.$on('closewindown', res => {
				this.visible = res;
			});
		},
		watch: {
			myValue(n, o) {
				console.log(n, o);
			}
		},
		methods: {
			gotopage(url) {
				uni.navigateTo({
					url: url
				})
			},
			closewin() {
				this.visible = false;
			}
		}
	}
</script>

<style lang="scss">
	.test-app {
		color: #FF0000;
		font-weight: bold;
		font-size: 40rpx;
		text-align: center;
		width: 100%;
	}
	
	.fontredself {
		color: #FF0000;
		font-weight: bold;
	}

	.responsbox {
		display: flex;
		flex-direction: column;

		.responsibility {
			font-size: 28rpx;
			line-height: 45rpx;
			flex: 1;
			display: flex;
			color: #000;
			flex-direction: column;
			justify-content: flex-start;
		}

		.close-bots {
			width: 80%;
			height: 80rpx;
			margin: 35rpx auto;
			background-color: $uni-color-primary;
			display: flex;
			justify-content: center;
			align-items: center;
			color: #fff;
			font-size: 28rpx;
			border-radius: 30rpx;
		}
	}

	.intro {
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		color: #dcdcdc;
		font-size: 25rpx;
		height: 155rpx;

		.huodong {
			width: 260rpx;
			position: relative;
			color: #d3d1d1;
			border-top: 1rpx solid #d3d1d1;
			margin-bottom: 30rpx;

			text {
				font-weight: bold;
				text-align: center;
				background-color: #f0f0f0;
				font-size: 32rpx;
				position: absolute;
				top: -30rpx;
				left: 48rpx;
				height: 40rpx;
				width: 150rpx;
				display: block;
				padding: 10rpx;
			}
			.rankbg{
				background-color: #fff;
			}
		}
		
		.font-sizewodr {
			font-size: 25rpx;
		}
	}

	.proposal {
		color: #b9b9b9;
		font-size: 28rpx;
		display: flex;
		width: 100vw;
		justify-content: center;
		align-items: center;
		margin: 40rpx 0;
		margin-bottom: 10rpx;

		.jianju {
			margin: 0 10rpx;
		}
	}
</style>
